package com.wn.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author yellow Docter
 * @date 2023 -07-27
 * @desc
 */
@Component
public class Consumer {

    // 直接绑定 队列就可以 不需要绑定
    @RabbitListener(queues = "work")
    public void handler(String msg){
        System.out.println("msg = " + msg);
    }

}
